package cn.drenal.capcap.entity;

import cn.drenal.capcap.entity.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.tangzc.autotable.annotation.*;
import com.tangzc.autotable.annotation.enums.IndexTypeEnum;
import com.tangzc.mpe.autotable.annotation.*;
import com.tangzc.mpe.processer.annotation.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 活动标签关联表
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper
@Table(comment = "活动标签关联表")
@TableIndex(name = "activity_tag_index", fields = {"activityId", "tagId"}, type = IndexTypeEnum.UNIQUE)
public class ActivityTag extends BaseEntity {
    @ColumnComment("主键")
    @ColumnId(mode = IdType.AUTO)
    private Long id;

    @ColumnComment("活动ID")
    @ColumnNotNull
    @Index
    private String activityId;

    @ColumnComment("标签ID")
    @ColumnNotNull
    @Index
    private String tagId;
}